﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
  <class name="DANHibernate.FullUser, DANHibernate" table="tbl_user">
    <id name="UserId" column="user_id" type="integer">
      <generator class="assigned" />
    </id>
    <bag name="Phones" table="tbl_phone" cascade="all" lazy="false">
      <key column ="user_id" />
      <many-to-many class="DANHibernate.Phone, DANHibernate" column="phone_id" />
    </bag>
    <property name="FirstName" column= "first_name" type="String" length="50"/>
    <property name="LastName" column= "last_name" type="String" length="50"/>
  </class>
</hibernate-mapping>
